<template>
    <div >
      <div class="backTop">
        <i class="iconfont icon-tubiao102" @click="backTop"></i>
      </div>
    </div>
</template>

<script>
    export default {
        name: "backtop",
      methods:{
        backTop() {
          console.log(document.body.scrollTop)
          console.log(document.documentElement.scrollTop)
          document.body.scrollTop = 0
          document.documentElement.scrollTop = 0
        }
      }
    }
</script>

<style scoped>
  .backTop{
    /*border:1px solid;*/
    position: fixed;
    right:20px;
    bottom:100px;
  }
  .icon-tubiao102{
    /*background:#fff;*/
    font-size:30px;
    color:rgba(0,0,0,.5);
  }
</style>
